import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { usePermission } from "/@/hooks/web/usePermission";
const { hasPermission } = usePermission();

//列表数据
export const columns: BasicColumn[] = [
  {
    title: '签约商户',
    align: "center",
    dataIndex: 'businessId_dictText'
  },
  {
    title: '服务公司',
    align: "center",
    dataIndex: 'companyId_dictText'
  },
  {
    title: '任务名称',
    align: "center",
    dataIndex: 'settleName'
  },
  {
    title: '成功数据',
    align: "center",
    dataIndex: 'successAmount',
    slots: { customRender: 'successSlot' },
  },
  {
    title: '任务结算单',
    align: "center",
    dataIndex: 'settleDoc',
    slots: { customRender: 'fileSlot' },
  },
  {
    title: '确认函',
    align: "center",
    dataIndex: 'confirmationLetterDoc',
    slots: { customRender: 'fileSlot' },
  },
  {
    title: '结算清单',
    align: "center",
    dataIndex: 'settleListDoc',
    slots: { customRender: 'fileSlot' },
  },
  {
    title: '审核状态',
    align: "center",
    dataIndex: 'checkStatus',
    slots: { customRender: 'checkStatusSlot' },
  },
  {
    title: '任务时间',
    align: "center",
    sorter: true,
    helpMessage: ['任务结算创建时间'],
    dataIndex: 'settleCreateTime'
  },
  {
    title: '创建时间',
    align: "center",
    sorter: true,
    dataIndex: 'createTime'
  },
  {
    title: '上传时间',
    align: "center",
    sorter: true,
    dataIndex: 'uploadTime',
    customRender:({text}) =>{
      return !text ? "-" : text;
    },
  },
  {
    title: '审核时间',
    align: "center",
    sorter: true,
    dataIndex: 'checkTime',
    customRender:({text}) =>{
      return !text ? "-" : text;
    },
  },
  {
    title: '拒绝原因',
    align: "center",
    dataIndex: 'rejectReason',
    customRender:({text}) =>{
      return !text ? "-" : text;
    },
  },
];
